<?php
namespace App\Controller;

use App\Model\User;
use EasyPhpWeb\Controller;
use EasyPhpWeb\View;
use Illuminate\Database\Capsule\Manager as DB;

class HomeController extends Controller {
    
    public function index(){

        $name = $this->request->query("name");
        
        return "this name = {$name}";
    }


    public function test(){
        
        $list = DB::table("admin_users")->first();

        var_dump($list);

        $user = User::query()->first(); 

        var_dump($user);

        return "is test";
    }

    public function testView(){
        return View::render('index.php', [
            'name' => 'wudx'
        ]);
    }
}